﻿namespace demo20_循环结构练习
{
    internal class Program
    {
        static void Main(string[] args)
        {
            //Console.WriteLine("Hello, World!");
            //斐波那契数列 前12项 要求按照每行6个数对齐输出
            //1,1,2,3,5,8,13,21,34,55,89...
            //从第三项开始 每一项都等于前两项之和
            int a = 1;
            Console.WriteLine("第1个数字为->" + a);
            int b = 1;
            Console.WriteLine("第2个数字为->" + b);
            for(int i = 3;i <= 12; i++)
            {
                int c = a + b;
                Console.WriteLine($"第{i}个数字为->" + c);
                a = b;
                b = c;
            }


            //九九乘法表
            for(int i = 1;i < 10; i++)
            {
                for (int j = 1; j <= i; j++)
                {
                    Console.Write($"{i}*{j}={i * j}");
                }
                Console.WriteLine();
            }

        }
    }
}
